﻿@model Package
@{
    Layout = "~/Views/Shared/_Dashboard.cshtml";
    IEnumerable<DNA.Mvc.Exporting.Exporter> exporters = ViewBag.Exporters;
}
@UIHelper.ImageTitle(Html.Global("ExportSolution_Title"), Html.Global("ExportSolution_Desc"), Url.Content("~/content/images/icon_save_48.png"))
@UIHelper.SectionHeader(Html.Global("PackageForm_Information"))
<style>
    .file-upload-buttons { padding: 5px 0px; }
</style>
@using (Html.BeginForm("Export", "Solution", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary()
    Html.RenderPartial("_PackageForm", Model); 
    @UIHelper.SectionHeader(Html.Global("RES_CONTENT"))
    <ul class="ui-helper-reset">
        @foreach (var exporter in exporters)
        {
            if (exporter.Visible)
            {
                var desc = exporter.Description;
                if (!string.IsNullOrEmpty(exporter.ResKey))
                {
                    if (!string.IsNullOrEmpty(exporter.ResBaseName))
                    {
                        desc = Html.Global(exporter.ResBaseName, exporter.ResKey);
                    }
                    else
                    {
                        desc = Html.Global(exporter.ResKey);
                    }
                }
            <li>
                <p>
                    @Ajax.Dna().Checkbox("Exporter." + exporter.Name, desc, true, Url.Content("~/content/images/icon_accept_16.png"), Url.Content("~/content/images/icon_block_16.png")).GetHtml()
                </p>
            </li>
            }
        }
    </ul>
    <hr />
    <div id="d_buttons" style="padding: 10px; text-align: center;">
        @{ Ajax.Dna().Button("btnExportPageData")
                               .LocText("RES_EXPORT")
                               .Submit()
                               .ImageIcons(Url.Content("~/content/images/icon_download_16.gif"))
                               .Render();
        }
    </div>
}